package com.hee.erp.modules.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hee.erp.modules.entity.SysDepart;
import com.hee.erp.modules.mapper.SysDepartMapper;
import com.hee.erp.modules.service.ISysDepartService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author weizehong
 * @since 2022-04-15
 */
@Service
@Transactional
public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart> implements ISysDepartService {

    @Override
    public List<SysDepart> getListByCompanyId(String companyId) {

        LambdaQueryWrapper<SysDepart> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SysDepart::getCompanyId, companyId);

        return this.list(queryWrapper);
    }
}
